﻿@{
    Layout = null;
}
@("@using Abp.Web.Mvc.Extensions")
@using SJNScaffolding.Models.CollectiveType
@model SJNScaffolding.Models.TemplateModels.ViewFileModel
@Html.Raw("@{ViewBag.Title =\"\";}")
@("@section styles{")
@{
    if (Model.WebUploadList.Count > 0)
    {
        <link href="~/bower_components/webuploader/webuploader.css" />
    }
}
@("}")
@("@section scripts{")
@Html.Raw("         @Html.IncludeScript(\"/Areas/Plat/Views/" + Model.TableName + "/Index.js\")")
@{
    if (Model.WebUploadList.Count > 0)
    {
        <script src="~/bower_components/webuploader/webuploader.min.js"></script>
    }
    if (Model.WebUploadList.Any())
    {
        <script src="~/bower_components/staticfile/libs/abp.webuploader.js"></script>
    }
}
@("}")
<div class="easyui-layout" data-options="fit:true">
    @if (Model.SearchColumnNames != null)
    {
        int searchCount = Model.SearchColumnNames.Count;
        <div data-options="region:'north',border:false" style="height: 54px;">
            <form id="searchForm">
                <table class="kv-table no-border">
                    @for (int i = 0; i < searchCount; ++i)
                    {
                        <tr>
                            @if (i < searchCount)
                            {
                                <th class="kv-label">@Html.Raw(Model.SearchColumnNames[i].Comments)</th>
                                <td class="kv-content">
                                    <input name="@Model.SearchColumnNames[i].ColumnName" id="@Model.SearchColumnNames[i].ColumnName" class="easyui-textbox" />
                                </td>

                                i++;
                            }
                            @if (i < searchCount)
                            {

                                <th class="kv-label">@Html.Raw(Model.SearchColumnNames[i].Comments)</th>
                                <td class="kv-content">
                                    <input name="@Model.SearchColumnNames[i].ColumnName" id="@Model.SearchColumnNames[i].ColumnName" class="easyui-textbox" />
                                </td>
                            }
                            @if (i == searchCount || i + 1 == searchCount)
                            {
                                <td>
                                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="com.filter('#searchForm', '#dgGrid');">查询</a>
                                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-undo'" onclick="com.clear('#searchForm', '#dgGrid')">清空</a>
                                </td>
                            }
                        </tr>
                    }
                </table>
            </form>
        </div>
    }
    <div data-options="region:'center',border:false">
        <table id="dgGrid"></table>
    </div>
</div>


